#pragma once

#include <memory>
#include <string>
#include <chrono>
#include "log/fmt.h"

namespace xlog {

#define XLOG_LEVEL_ON       0
#define XLOG_LEVEL_TRACE    1
#define XLOG_LEVEL_DEBUG    2
#define XLOG_LEVEL_INFO     3
#define XLOG_LEVEL_WARN     4
#define XLOG_LEVEL_ERROR    5
#define XLOG_LEVEL_OFF      6

/**
 * @brief 日志等级
 */
enum class log_level
{
    trace = XLOG_LEVEL_TRACE,
    debug = XLOG_LEVEL_DEBUG,
    info =  XLOG_LEVEL_INFO,
    warn =  XLOG_LEVEL_WARN,
    error = XLOG_LEVEL_ERROR,
    off =   XLOG_LEVEL_OFF,
};

class log_sink;

using log_sink_ptr = std::shared_ptr<log_sink>;

using log_raw_string = std::string;

using log_filename = std::string;

using log_clock = std::chrono::system_clock;

using log_memory_buf = fmt::basic_memory_buffer<char, 256>;

using log_string_view = fmt::basic_string_view<char>;

using log_wstring_view = fmt::basic_string_view<wchar_t>;
    
} // namespace xlog


